Release 10.1A: OpenEdge Development:
Web Services


Scenario 2: 4GL updated, but Web service not redeployed

In this scenario, the 4GL is updated with a different procedure prototype (signature), but the Web service is not updated accordingly. At this point:

  1. The client sends the following method request:
  2. FindCustomerByNum(3, custNameVar) 
    

  3. The WSA gets the request and asks the AppServer to run the procedure FindCustomerByNum.p.
  4. The AppServer:
    1. Tries to run FindCustomerByNum.p.
    2. Detects a parameter-type mismatch and records the following error message in its log, *.server.log:
    3. [02/12/11@16:07:01.427-0500] P-000371 T-000370 0 AS -- 
        Mismatched parameter types passed to procedure 
        OrderInfo/FindCustomerByNum.p. (3230) 
      

    4. Returns the error to the WSA.
  5. The WSA:
    1. Records the following message in its log:
    2. [02/12/11@16:07:01.802-0500] P-000120 T-Thread-11 2 OrderInfo 
      4GL-Provider     (reqid:6) Error in SOAP request execution: 4GL 
      ERROR condition: Mismatched parameter types passed to 
      procedure OrderInfo/FindCustomerByNum.p. (3230) (7211) (10926) 
      

    3. Sends the following SOAP containing a SOAP fault back to the client:
    4. <?xml version="1.0" encoding="UTF-8" ?> 
      <soap:Envelope  namespaces defined here…> 
        <soap:Body> 
          <soap:Fault> 
            <faultcode>SOAP-ENV:Server</faultcode> 
            <faultstring>An error was detected … request. (10893) 
            </faultstring> 
            <detail> 
              <ns1:FaultDetail 
                soap:encodingStyle=“http://schemas.xmlsoap.org/…/” 
                xmlns:ns1="http://servicehost:8080/wsa/wsa1"> 
                <errorMessage xsi:type=“xsd:string">Error in SOAP 
                  request execution: 4GL ERROR condition: Mismatched 
                  parameter types passed to procedure 
                  OrderInfo/FindCustomerByNum.p.  … (10926) 
                </errorMessage>  
                <requestID xsi:type=“xsd:string">2e62cab6b81150d5: 
                  -87f76e:f20f57227d:-8000#6 
                </requestID>  
              </ns1:FaultDetail> 
            </detail> 
          </soap:Fault> 
        </soap:Body> 
      </soap:Envelope> 
      

      Note: This example uses a value of 3 for the serviceFaultLevel property.

      Notice the correspondence between the "(reqid:6)" string in the log file entry and the "<requestID> ...2e62...#6" string in the SOAP fault message, indicating information for the same request.

  6. The interface translates the SOAP fault into a SOAP exception.
  7. The client catches the SOAP exception.
  8. The client displays the following error message (assuming the client application has a user interface):
  9. Note: All .NET client applications should always catch SOAP faults and handle them. If not, the .NET Framework’s default exception handler displays the SOAP fault general error information. This might well hide and cause the loss of the more useful error detail information in the SOAP fault. For client applications without a user interface, all error information must be written to an application log file to ensure it is not lost.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095